package com.example.administrator.demob;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

public class HighPriorityReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String name = intent.getStringExtra("NAME");
        int age = intent.getIntExtra("AGE",0);
        Log.e("HighPriorityReceiver", "onReceive  name = "+ name +
        "   age = "+age);

        //向下一级传输数据
        Bundle bundle = new Bundle();
        bundle.putString("ADDRESS","Baiyun Park");
        bundle.putInt("NUMBER",7);
        setResultExtras(bundle);
    }
}
